﻿using System;
using System.Collections.Generic;
using LitJson;
using System.IO;
public class JsonUtils
{

    public static T getSkill<T>(string name)
    {
        string fullUrl = string.Format("Config/Skill/{0}", name);
        string path = fullUrl;// Path.Combine(Application.dataPath, fullUrl);
        return getByPath<T>(path);
    }

    public static T getByPath<T>(string path)
    {
        string str = File.ReadAllText(path);
        return JsonMapper.ToObject<T>(str);
    }


}